package com.sto.stoapp.db.constant;

/**
 * 问题件接口
 * 
 * @author mgf
 * 
 */
public interface StoProblemConstant extends StoBaseConstant {

	/**
	 * 类别编号
	 */
	public static final String TYPE_CODE = "type_code";

	/**
	 * 类别名称
	 */
	public static final String TYPE_NAME = "type_name";

	/**
	 * 原因编号
	 */
	public static final String REASON_CODE = "reason_code";

	/**
	 * 原因名称
	 */
	public static final String REASON_NAME = "reason_name";

	public static final String LEVEL = "level";

	/**
	 * 使用界面
	 */
	public static final String USER_WIDGET = "user_widget";

	/**
	 * 问题件数据库表
	 */
	public static final String PROBLEM_TABLE = "problem_table";

	/**
	 * 创建问题件数据库表
	 */
	public static final String CREATE_PROBLEM_TABLE = "CREATE TABLE "
			+ " if not exists "
			+ PROBLEM_TABLE
			+ "("
			+ TYPE_CODE
			+ " text "
			+ ","
			+ TYPE_NAME
			+ " text"
			+ ","
			+ ID
			+ " text  "
			+ ","
			+ REASON_CODE
			+ " text primary key"
			+ ","
			+ STATUS
			+ " text "
			+ ","
			+ VERSION
			+ " text "
			+ ","
			+ REASON_NAME
			+ " text"
			+ ","
			+ USER_WIDGET
			+ " text"
			+ ","
			+ LEVEL
			+ " text"
			+ ","
			+ BACKUPS_ONE
			+ " char(50)"
			+ ","
			+ BACKUPS_TWO
			+ " char(50)"
			+ ","
			+ BACKUPS_THREE
			+ " char(50)"
			+ ")";

	/**
	 * 删除问题件数据库表
	 */
	public static final String DROP_PROBLEM_TABLE = "drop table if exists "
			+ PROBLEM_TABLE;
}
